ROAD TEST - OPTIONAL SOURCE AND LIBRARY REPLACEMENT

These files are not needed to install or use Road Test.
Work on copies. Never overwrite your installed device, original songs or keys.

Contents
  upstream/: pinned codec/wrapper sources and upstream build files.
  editable-device/: unfrozen Max for Live packaging input and runtime scripts.
  decoder-bundle-recipe/: JavaScript bundler inputs and dependency lock file.
  MANIFEST.json: checksums for the supplied files.

Native source versions
  wasm-media-encoders 0.7.0: 4a45333baadbab312d1cc0911151dfad23157c51
  LAME: 98db548e8e851defbba3184125ce10725355c332
  mpg123-decoder 1.0.3: 8f2428c1cd96b54dab74836c8471ff75fe35cbee
  common 9.0.7: e4f7eef8cda48719a884023582d8efc5b8d76f6c
  mpg123: 08247b317163175e62035893af3ff9e71a5dfefd

Encoder build environment
The pinned encoder's .devcontainer/devcontainer.json specifies
emscripten/emsdk:2.0.8 with Node 20. Its Makefile uses Emscripten, Binaryen's
wasm-metadce, make and Yarn. The upstream .devcontainer files and Yarn
configuration are included. This records upstream's environment; it does
not claim that a bit-for-bit reproduction of the published WASM was performed.

To rebuild MP3 only in a Linux-like Emscripten environment:
1. Copy the supplied LAME source into the encoder source's
   src/wasm/lame/lame-src directory (the path in .gitmodules).
2. Install the pinned JavaScript build dependencies using its Yarn lock file.
   Review the upstream scripts before running them.
3. Use the Makefile's wasm-prod target with its MP3 output variables only:
   make wasm-prod wasm_output=mp3.wasm wasm_full_output=mp3_full.wasm
4. The MP3 WASM output is wasm/mp3.wasm. Follow the same wrapper API as the
   supplied encoder.cjs, or adapt the openly supplied Road Test glue to your
   replacement. The native source archive includes LAME's own build files.

Decoder build environment
The pinned wasm-audio-decoders project documents Emscripten 4.0.7 with a
Linux-like environment. Put the supplied mpg123 native tree at modules/mpg123.
Its Makefile target mpg123-decoder builds that decoder (not the other codecs).
Keep the matching common source available; its puff source is included.
The separate common 9.0.7 snapshot matches the published package used by the
device. See the upstream Makefile and README for the exact build dependencies.

The decoder-bundle-recipe directory contains Road Test's JS entry point,
package-lock.json and build-decoder.cjs. With Node.js and npm:
  npm ci --ignore-scripts
  node build-decoder.cjs
This rebuilds the JS bundle using the pinned npm WASM package. To use your own
modified native decoder, replace that package's generated WASM module/source
with your build before running the bundler. It is not a native-code rebuild.

Replacing a library in Road Test
1. Copy editable-device to a new working folder.
2. Put the replacement MP3 library at
   node_content/encoder-lab/small-bundle/mp3.wasm; for a decoder, replace
   node_content/encoder-lab/small-bundle/decoder.cjs.
3. The encoder glue node_content/encoder-lab/wasm-codec.cjs has a PIN constant:
   it is a SHA-256 correctness check for the encoder used to validate delay
   and padding. Update it for your replacement. It is not a secret or licensing
   lock. If encoder delay changes, adapt gapless-tag.cjs and verify duration.
4. Load the unfrozen Road Test.amxd from this working copy in a disposable
   Live Set. Use Edit in Max, then Max's device-freezing controls if you want
   a new self-contained device. The supplied JS and Max patch are editable.
5. Test leading silence, ending/tail, MP3 duration and playback, cancellation,
   repeated exports, and cleanup before using the replacement on real music.

Cloud purchase verification remains server-side; modifying local codecs does
not change your listening-room allocation. Never include your Cloud profile,
receipt key, access link, or local recordings in a redistributed source copy.

Verification scope
The release AMXD and its embedded runtime were hash-audited. Source archive
versions and native submodule pins were matched. The native build commands
above describe upstream's build path; a fresh native codec rebuild has not
been run as part of this release preparation.
